package tpdisenio2009.mvp.display;

import java.awt.event.ActionListener;
import java.awt.event.ItemListener;
import java.util.List;
import tpdisenio2009.model.beans.RealTeam;
import tpdisenio2009.model.beans.SoccerPlayer;

/**
 *
 * @author Pablito
 */
public interface QueryAFAPlayersView extends View {

    public static final int MIN_ERROR = 0;
    public static final int MAX_ERROR = 1;
    public static final int NOT_SELECTED_PLAYER_ERROR = 2;
    public static final int GK_ERROR = 3;
    public static final int DF_ERROR = 4;
    public static final int MF_ERROR = 5;
    public static final int FW_ERROR = 6;
    public static final int THREE_PLAYERS_ERROR = 7;
    public static final int SAME_PLAYER_ERROR = 8;
    public static final int COTIZATION_ERROR = 9;

    //Posociones a poner en el JComboBox
    public static final String GOALKEEPER = "Arquero";
    public static final String DEFENDER = "Defensor";
    public static final String MIDFIELDER = "Volante";
    public static final String FORWARD = "Delantero";

    void setClubs( List<RealTeam> clubs );
    RealTeam getClub();
    void addClubChangeListener( ItemListener listener );
    void removeClubChangeListener( ItemListener listener );

    void setMinCotization( Integer minCotization );
    Integer getMinCotization();
    boolean isMinCotizationEmpty();
    String getMinCotizationString();
    
    void addMinCotizationChangeListener( ActionListener listener );
    void removeMinCotizationChangeListener( ActionListener listener );

    void setMaxCotization( Integer maxCotization );
    Integer getMaxCotization();
    boolean isMaxCotizationEmpty();
    String getMaxCotizationString();
    
    void addMaxCotizationChangeListener( ActionListener listener );
    void removeMaxCotizationChangeListener( ActionListener listener );

    //Se refiere al presupuesto restante.
    int getBudget();

    //Se refiere al equipo a modificar.
    List<SoccerPlayer> getSoccerPlayers();

    void setPosition( List<String> positions );

    void setSelectedPosition( String position );

    void disablePosition();
    
    // Se refiere a la posicion que se pasó por parámetro.
    String getWindowPosition();

    String getCurrentPosition();
    
    void addPositionChangeListener( ItemListener listener );
    void removePositionChangeListener( ItemListener listener );

    void loadSoccerPlayers( List<SoccerPlayer> soccerPlayers );

    SoccerPlayer getSelectedPlayer();

    void setLlevasGastado( Integer gastado );

    void setTeQuedan( Integer quedan );

    void addSearchPlayerListener( ActionListener listener );
    void removeSearchPlayerListener( ActionListener listener );

    void addAddPlayerListener( ActionListener listener );
    void removeAddPlayerListener( ActionListener listener );

    void addExitListener( ActionListener listener );
    void removeExitListener( ActionListener listener );

    void showError( int focuElement, String errorMessage, String titleMessageWindow );

    void showNotification( String notificationMessage, String notificationTitle);

    void close();

}
